//
//  BoxConfirmViewController.h
//  OrderSeat
//
//  Created by haiming on 13-10-11.
//  Copyright (c) 2013年 wangwei. All rights reserved.
//

#import "AlertWindowView.h"
#import "DishOrdersCell.h"

@class SeatConfirmDataSource;
@interface SeatConfirmViewController : BaseViewController<UITextFieldDelegate, UIGestureRecognizerDelegate,UIAlertViewDelegate,AlertWindowViewDelegate,DishOrdersCellDelegate>

@property (strong, nonatomic) IBOutlet UIButton *selDishBtn;
@property (strong, nonatomic) IBOutlet UIButton *shopNameBtn;
@property (strong, nonatomic) IBOutlet UILabel *dinnerTimeLabel;
@property (strong, nonatomic) IBOutlet UILabel *seatNameLabel;
@property (strong, nonatomic) IBOutlet UITextField *dinnerCountTF;
@property (strong, nonatomic) IBOutlet UIButton *selMyPhoneBtn;
@property (strong, nonatomic) IBOutlet UILabel *myPhoneLabel;
@property (strong, nonatomic) IBOutlet UIButton *selOtherBtn;
@property (strong, nonatomic) IBOutlet UITextField *otherPhoneTF;
@property (strong, nonatomic) IBOutlet UITextField *otherNameTF;
@property (strong, nonatomic) IBOutlet UIView *otherView;

@property (strong, nonatomic) IBOutlet UIButton *sirBtn;
@property (strong, nonatomic) IBOutlet UIButton *ladyBtn;
@property (strong, nonatomic) IBOutlet UIButton *submitBtn;
@property (strong, nonatomic) IBOutlet UIScrollView *theScrollview;
@property (strong, nonatomic) IBOutlet UITableView *dishOrderTable;

@property (strong, nonatomic) IBOutlet UIView *headView;
@property (strong, nonatomic) IBOutlet UIView *bodyView;
@property (strong, nonatomic) IBOutlet UIImageView *line1;
@property (strong, nonatomic) IBOutlet UIImageView *line2;
@property (strong, nonatomic) IBOutlet UIImageView *line3;
@property (strong, nonatomic) IBOutlet UIImageView *line4;
@property (strong, nonatomic) IBOutlet UIImageView *line5;
@property (strong, nonatomic) IBOutlet UILabel *selDishTextLabel;

@property (assign, nonatomic) BOOL orderSuccess;
@property (strong, nonatomic) NSString *orderId;

@property (strong, nonatomic) NSString     *shopId;
@property (strong, nonatomic) NSDictionary *shopEntity;
@property (strong, nonatomic) NSMutableDictionary *seatEntity;
@property (strong, nonatomic) SeatConfirmDataSource *dataSource;

- (id)initWithShopId:(NSString*)shopId;

@end

@interface SeatConfirmDataSource : BaseDataSource<UITableViewDataSource,UITableViewDelegate>

@property (strong, nonatomic) NSArray *dishOrderList;
@property (strong, nonatomic) SeatConfirmViewController *viewController;

- (void)fetchDishOrders;
- (void)submitOrderWithURL:(NSString*)url;
- (void)checkHaveSeat;

@end